Conversation
o-nikolas
left a comment
There was a problem hiding this comment.
Can you add or update a unit test case to cover this edge? So that we don't regress again in the future. Somewhere here-ish:
airflow/tests/sensors/test_external_task_sensor.py
Lines 344 to 494 in 753fe42
|
Good point @o-nikolas I was being lazy and didn't want to figure out how to run the test suite. You've pushed me to do the right thing and I think I've added a commit/test that addresses it and fails with the old code while passing with the new. Let me know what you think. |
Thanks for adding a test case! A committer will be required to run the workflow for a first time committer (and ultimately merge if everything passes and they are happy with the code). Unfortunately I am not a committer, I'll CC a few who may have time to have a look: @eladkal @potiuk @kaxil |
|
There was a change merged recently to standardize quoting in Airflow, you'll need to rebase this PR and run static checks locally to patch those up. |
|
@o-nikolas I merged in main enabled pre-commit and updated my quoting style so hopefully that's the last of the linting though we'll see for sure after PR checks run. Thanks for the help and heads up that it had changed. |
|
It's fine but I think we need a newsfragment describing this change in the behaviours. This is borderline breaking change/bugfix and while I would lean more on the bugfix side, but people could have relied on it and it should be described in more detail in changelog. |
|
@potiuk because of this bug, to use the In those cases, fixing this bug will cause a change in the exception they receive from Does that sound about right? What would you propose we do? I'm happy to update a changelog if I'm pointed in the right direction? Also, there are some failing checks on this PR that I don't understand. Specifically, in the Sqlite Py3.7: API Always CLI Core Integration Other Providers WWW check a test fails that I'm pretty sure I don't go anywhere near: Any ideas on that front? The logs are long and I didn't see much useful in them while looking through so I wanted to ask before trying to dig deeper as I'm not super familiar with this code-base and the checks on it. |
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments. |
|
@eladkal I've added a newsfragment as suggested. For what it's worth, I think this should break very few if any people because most folks would want their DAGs to fail in the case of an upstream external task failing whether by timeout or because a task in a chain fails. I doubt there are many people who are trying to catch an exception and act on it in this case, but it's at least documented now that you might have to change the exception type in case anyone falls into that bucket. |
|
Can you please rebase/solve conflicts? |
c470ba2 to
96b0039
Compare
|
@potiuk sorry about that, I had been merging in Let me know if you need anything else on my end. |
|
@eladkal I noticed that the following test failed for the "Tests / Sqlite Py3.7: API Always CLI Core Integration Other Providers WWW (pull_request)" pre-submit job but I'm pretty sure this test has nothing to do with my code. Does that seem right? Is there anything I should be doing? Or do these tests fail intermittently or something? Thanks for the help! |
|
I reran the test. lets see what happens |
|
@eladkal that seems to have done the trick, thanks for the help! Anything else you need on my end to get this merged? |
|
Awesome work, congrats on your first merged pull request! |
At @o-nikolas request, I'm creating a new PR to attempt to fix #16204 where the ExternalTaskSensor would hang indefinitely when an execution_date_fn is used, failed_states/allowed_states are set, and external DAGs have mixed states upstream.